#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/4/15 15:49
# @Author  : Chenmm
# @File    : SysConfig.py
# @Software: PyCharm


from app import db
from datetime import datetime


class SysConfig(db.Model):
    __tablename__ = 'sys_config'

    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
    config_name = db.Column(db.String(50), nullable=False, comment='配置名称')
    config_key = db.Column(db.String(50), unique=True, nullable=False, comment='配置key')
    config_value = db.Column(db.String(100), nullable=False, comment='配置值')
    remark = db.Column(db.String(255), comment='备注')
    create_time = db.Column(db.DateTime, default=datetime.now, comment='创建时间')
    create_by = db.Column(db.BigInteger, comment='创建人ID')
    update_time = db.Column(db.DateTime, onupdate=datetime.now, comment='更新时间')
    update_by = db.Column(db.BigInteger, comment='更新人ID')
    is_deleted = db.Column(db.SmallInteger, default=0, nullable=False, comment='逻辑删除标识')

    __table_args__ = {'comment': '系统配置表'}
